﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/TemplateAdmin.Master" Inherits="System.Web.Mvc.ViewPage<MvcVehicleInsurance.Models.Estimate>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Create
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Create</h2>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>

        <fieldset>
            <legend>Fields</legend>
            
            <div class="editor-label">
                <%: Html.LabelFor(model=>model.billNo)%>
            </div>


            <div class="editor-field">
            <% try
               {
            %>        <%:Html.DropDownListFor(model => model.billNo, ((SelectList)ViewData["listBill"]))%>
            <%
               }catch (System.Web.HttpException)
               {
            %>
                   <%: Html.Label("ListCustomersBill Not Exist")%>
            <%   } %>
            <%catch (System.Exception)
               {
            %>
                   <%: Html.Label("ListCustomersBill Not Exist")%>
            <%   } %>
            </div>



            <div class="editor-label">
                <%: Html.Label("Vehicle:") %>
            </div>
            <div class="editor-field" >
                <%: Html.DropDownListFor(model=> model.vehicleID, ((SelectList)ViewData["listVehicle"]))%>
            </div>
            <div class="editor-label">
                <%: Html.Label("PolicyNumber:") %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(model=>model.policyNumber,((SelectList)ViewData["listPolicy"]))%>
            </div>
            
            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Back to List", "Index") %>
    </div>

</asp:Content>

